package com.shardingsphere.modules.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shardingsphere.core.config.datasource.DataSource;
import com.shardingsphere.core.config.shardingsphere.DatasourceType;
import com.shardingsphere.modules.entity.Teacher;
import com.shardingsphere.modules.mapper.TeacherMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherService extends ServiceImpl<TeacherMapper, Teacher> implements IService<Teacher> {

//    @DataSource(DataSourceEnum.DB2)
//    public boolean insert(Teacher entity) {
//        return super.save(entity);
//    }
//
//    @Override
//    @DataSource(DataSourceEnum.DB2)
//    public boolean removeById(Serializable id) {
//        return super.removeById(id);
//    }
//
//    @Override
//    @DataSource(DataSourceEnum.DB2)
//    public boolean updateById(Teacher entity) {
//        return super.updateById(entity);
//    }
//
//    @DataSource(DataSourceEnum.DB2)
//    public Teacher selectById(String id) {
//        return super.getById(id);
//    }
//
    @DataSource(DatasourceType.DB2)
    public List<Teacher> selectList() {
        return super.list();
    }
//
//    @DataSource(DataSourceEnum.DB2)
//    public Page<Teacher> selectPage(Page<Teacher> page, Wrapper<Teacher> wrapper) {
//        return super.page(page, wrapper);
//    }
}
